<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="UTF-8">
  <title>事件绑定作业1</title>
</head>
<body>
<!--视图-->
<div id="app">
  <h1>{{message}}</h1>
  <button @click="addOne()">点击增加1次</button>
  <button @click="addTwo()">点击增加2次</button>
  <h1>你的按钮被点了{{number}}次</h1>
</div>
<script src="vue.js"></script>
<script>
  let vm = new Vue({
    el: "#app",
    data: {
      message: "演示Vue事件绑定操作",
      number:0
    },
    methods: {
      addOne() {
        this.number=this.number+1;
      }, addTwo() {
        this.number=this.number+2;
      }
    }
  })
</script>
</body>
</html>